<div>
	<form method="post" action="<?php echo $action ?>" enctype="multipart/form-data">
		<ul>
			<li>
				<label for="name">Név</label>
				<input type="text" name="name" id="name" <?php if(isset($device)) echo('value=' . $device->name); ?> />
                <?php if(isset($errors['name']))echo ($errors['name']) ?>
			</li>
			<li>
				<label for="description">Leírás</label>
				<input type="text" name="description" id="description" <?php if(isset($device)) echo('value=' . $device->description); ?> />
                <?php if(isset($errors['description']))echo ($errors['description']) ?>
			</li>
			<li>
				<label for="image">Kép</label>
				<input type="file" name="image" id="image" <?php if(isset($device)) echo('value=' . $device->description); ?> />
                <?php if(isset($errors['image']))echo ($errors['image']) ?>
			</li>
			<li>
				<label for="category_id">Kategória</label>
				<?php echo Form::select('category_id', ORM::factory('category')->find_all()->as_array('id','name'), null, array('id' => 'category_id')); ?>
                <?php if(isset($errors['category_id']))echo ($errors['category_id']) ?>
			</li>
			<li><input type="submit" value="Mentés" /></li>
		</ul>
	</form>
</div>